﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DDD.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class AlterUserAddCreateTime : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<DateTime>(
                name: "CreateTime",
                table: "User",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "BoxMessage",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2024, 1, 22, 17, 0, 46, 57, DateTimeKind.Local).AddTicks(8752),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2024, 1, 22, 10, 58, 54, 34, DateTimeKind.Local).AddTicks(4549),
                oldComment: "创建时间");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CreateTime",
                table: "User");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "BoxMessage",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2024, 1, 22, 10, 58, 54, 34, DateTimeKind.Local).AddTicks(4549),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2024, 1, 22, 17, 0, 46, 57, DateTimeKind.Local).AddTicks(8752),
                oldComment: "创建时间");
        }
    }
}
